<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div class="play">过山车</div>
  <div class="play">旋转木马</div>
  <div class="play">摩天轮</div>
  <div class="play">观影院</div>
  <script>
    // 获取class为play的第1个div
    var firstPro = document.querySelector('.play'); 
    console.log(firstPro);
    // 获取class为play的所有div 
    var allPro = document.querySelectorAll('.play');
    console.log(allPro); 
  </script>
</body>
</html>